package cn.hicard.auth.entity;

/**
 * MgUserRoleId entity. @author MyEclipse Persistence Tools
 */

public class MgUserRoleId implements java.io.Serializable {

	// Fields

	private Integer pkUserinfo;
	private Integer pkRoleinfo;

	// Constructors

	/** default constructor */
	public MgUserRoleId() {
	}

	/** full constructor */
	public MgUserRoleId(Integer pkUserinfo, Integer pkRoleinfo) {
		this.pkUserinfo = pkUserinfo;
		this.pkRoleinfo = pkRoleinfo;
	}

	// Property accessors

	public Integer getPkUserinfo() {
		return this.pkUserinfo;
	}

	public void setPkUserinfo(Integer pkUserinfo) {
		this.pkUserinfo = pkUserinfo;
	}

	public Integer getPkRoleinfo() {
		return this.pkRoleinfo;
	}

	public void setPkRoleinfo(Integer pkRoleinfo) {
		this.pkRoleinfo = pkRoleinfo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MgUserRoleId))
			return false;
		MgUserRoleId castOther = (MgUserRoleId) other;

		return ((this.getPkUserinfo() == castOther.getPkUserinfo()) || (this
				.getPkUserinfo() != null
				&& castOther.getPkUserinfo() != null && this.getPkUserinfo()
				.equals(castOther.getPkUserinfo())))
				&& ((this.getPkRoleinfo() == castOther.getPkRoleinfo()) || (this
						.getPkRoleinfo() != null
						&& castOther.getPkRoleinfo() != null && this
						.getPkRoleinfo().equals(castOther.getPkRoleinfo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPkUserinfo() == null ? 0 : this.getPkUserinfo()
						.hashCode());
		result = 37
				* result
				+ (getPkRoleinfo() == null ? 0 : this.getPkRoleinfo()
						.hashCode());
		return result;
	}

}
